package com.prik.factory.simple;

import com.prik.factory.simple.pizza.CheesePizza;
import com.prik.factory.simple.pizza.Pizza;
import com.prik.factory.simple.pizza.VeggiePizza;

/**
 * @description: 披萨简单工厂
 * @author: prik
 * @create: 2019-07-26
 **/
public class SimplePizzaFactory {

    public Pizza createPizza(String type) {
        Pizza pizza = null;
        if ("cheese".equals(type)) {
            pizza = new CheesePizza();
        } else if ("veggie".equals(type)) {
            pizza = new VeggiePizza();
        }
        return pizza;
    }

}